package com.gxa.pingan.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * @author lirucong
 * @date 2021/10/25  11:11:19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel
public class Coupon implements Serializable {
    /**
     * 优惠券id
     */
    @ApiModelProperty(name = "id",value = "优惠券id",dataType = "Long")
    private Long id;

    /**
     * 优惠券名称
     */
    @ApiModelProperty(name = "name",value = "name",notes = "优惠券名称",dataType = "String",required = true)
    private String name;

    /**
     *获取方式发送方式的id
     */
    @ApiModelProperty(name = "methodId",value = "获取方式和发送方式的id,是有关联的",dataType = "Long",required = true)
    private CouponMethod method;
    private Long methodId;
    /**
     * 使用范围
     */
    @ApiModelProperty(name = "useRange",value = "useRange",notes = "使用范围",dataType = "String",required = true)
    private String useRange;
    /**
     * 开始时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "startTime",value = "startTime",notes = "开始时间",dataType = "Timestamp",required = true)
    private Timestamp startTime;
    /**
     * 结束时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "endTime",value = "endTime",notes = "结束时间",dataType = "Timestamp",required = true)
    private Timestamp endTime;
    /**
     * 0、空则不限数量
     */
    @ApiModelProperty(name = "num",value = "num",notes = "剩余数量",dataType = "Long",required = true)
    private Long num;
    /**
     * 后台乘以1000后存入数据库，取出来再计算
     */
    @ApiModelProperty(name = "price",value = "price",notes = "价格",dataType = "Long",required = true)
    private Long price;
    /**
     * 是否可以叠加使用
     */
    @ApiModelProperty(name = "isOvery",value = "isOvery",notes = "是否可以叠加使用",dataType = "Boolean",required = true)
    private Boolean isOvery;
    /**
     * 是否可用默认不可用
     */
    @ApiModelProperty(name = "inUse",value = "inUse",notes = "是否可用",dataType = "Boolean",required = true)
    private Boolean inUse;

    /**
     *领取数量
     */
    private Long getNum;

}
